home *** CD-ROM | disk | FTP | other *** search
- // VennCell.h
- // Copyright (c) 1992 by Paul Burchard.
- // May be used in any form with appropriate acknowledgement.
-
- #import <appkit/ActionCell.h>
-
- typedef BOOL (*BOOLOP)(BOOL, BOOL, ...);
-
- @interface VennCell : ActionCell
- {
- id vennRegions[4];
- float borderWidth;
- // Drawing parameter cache.
- NXRect drawRect, vennRects[4];
- // Tracking parameter cache.
- id trackingIn;
- }
-
- - init;
- - initTextCell:(const char *)aString;
- - free;
-
- // Setting the state.
- - setStateReplace:sender;
- - setStateRefine:sender;
- - setStateAdd:sender;
- - setStateRemove:sender;
- - setStateReverse:sender;
- - setState:(int)value;
- - takeStateFrom:sender;
- - takeStateFromIntValue:sender;
- - setStateFromOp:(BOOLOP)anOp;
-
- // Testing the state.
- - (int)state;
- - (BOOL)evalOp:(BOOL)arg1 :(BOOL)arg2;
- - (int)argCount;
-
- // Setting and testing appearance attributes.
- - setFont:fontObj;
- - setBorderWidth:(float)width;
- - (float)borderWidth;
- - takeFirstTitleFrom:sender;
- - takeSecondTitleFrom:sender;
- - setFirstTitle:(const char *)aString;
- - setSecondTitle:(const char *)aString;
- - (const char *)firstTitle;
- - (const char *)secondTitle;
-
- // Managing display.
- - drawInside:(const NXRect *)cellFrame inView:controlView;
- - drawSelf:(const NXRect *)cellFrame inView:controlView;
- - calcSubCellRects:(NXRect *)theVennRects inRect:(const NXRect *)aRect;
- - calcDrawInfo:(const NXRect *)aRect;
- - calcCellSize:(NXSize *)minSize;
- - calcCellSize:(NXSize *)minSize inRect:(const NXRect *)aRect;
-
- // Managing mouse events.
- - highlight:(const NXRect *)cellFrame inView:controlView lit:(BOOL)flag;//no-op
- - (BOOL)startTrackingAt:(const NXPoint *)startPoint inView:controlView;
- - (BOOL)continueTracking:(const NXPoint *)lastPoint
- at:(const NXPoint *)currentPoint
- inView:controlView;
- - stopTracking:(const NXPoint *)lastPoint
- at:(const NXPoint *)stopPoint
- inView:controlView
- mouseIsUp:(BOOL)flag;
- - incrementState;//no-op
- - toggleVennRegion:sender;
-
- // IB handshaking.
- - read:(NXTypedStream *)stream;
- - write:(NXTypedStream *)stream;
- - awake;
-
- @end
-
-